{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/css/base.css" media="all">
<style>
    html {
        background-color: #f2f2f2 !important;
    }
</style>
<body>
<div class="layui-fluid layui-anim-fadein">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
            <div class="layui-form-item" style="display: flex">
                <div class="nav">
                    <span style=""><i class="layui-icon"></i> {$nav.s_nav}</span>
                </div>
                <div class="nav_search">
                    {include file="form/items/search" type='' /}
                </div>
            </div>
        </div>
        <div class="layui-card-body">

            <div style="padding-bottom: 10px;">
                {foreach name="top_buttons" item="vo"}
                <a class="{$vo.class} layui-btn-radius" data-size="{$vo.width?$vo.width:''},{$vo.height?$vo.height:''}" data-url="{$vo.href?$vo.href:''}" onclick="{$vo.onclick}">
                    <i class="layui-icon {$vo.icon}"></i>{$vo.title}
                </a>
                {/foreach}
            </div>

            <table class="layui-table" lay-data="{page:true, url:'{:url('getList',$Request.param)}',id:'formId',totalRow: {$totalRow},'cellMinWidth':80,limit:20,limits:[20,40,60,80,100]}" lay-filter="table">
                <thead>
                <tr>
                    {foreach name="columns" item="vo"}
                    {if isset($vo.format) && $vo.format == 'password'}
                    {else}
                    <?php $data = json_encode($vo);?>
                    <th lay-data="{$data}">{$vo.title}</th>
                    {/if}
                    {/foreach}
                </tr>
                </thead>
            </table>
            <script type="text/html" id="barDemo">
                <div class="layui-btn-container">
                    {foreach name="right_buttons" key="key" item="vo"}
                    {{#  if(d.status == '待审核'){ }}
                    <a class="{$vo.class}" lay-event="{$vo.type},{$vo.url},{$vo.title},{$vo.width?$vo.width:''},{$vo.height?$vo.height:''}" style="background-color: #FF5722">审核</a>
                    {{#  } else { }}
                    <a class="{$vo.class}" lay-event="{$vo.type},{$vo.url},{$vo.title},{$vo.width?$vo.width:''},{$vo.height?$vo.height:''}">{$vo.title}</a>
                    {{#  } }}
                    {/foreach}
                </div>
            </script>
            <input type="hidden" id="update_url" value="{:url('update')}"/>
            <!-- 锁定绑定栏 -->
            <script type="text/html" id="lockTpl">
                <input type="checkbox" name="is_lock" value="{{d.id}}" lay-filter="status" lay-skin="switch" lay-text="锁定|正常" {{ d.is_lock== 1 ? 'checked' : '' }}>
            </script>

            <!-- 状态绑定栏 -->
            <script type="text/html" id="statusTpl">
                <input type="checkbox" name="status" value="{{d.id}}" lay-filter="status" lay-skin="switch" lay-text="开启|关闭" {{ d.status== 1 ? 'checked' : '' }}>
            </script>

            <!-- 推荐绑定栏 -->
            <script type="text/html" id="pickTpl">
                <input type="checkbox" name="pick" value="{{d.id}}" lay-filter="status" lay-skin="switch" lay-text="开启|关闭" {{ d.pick== 1 ? 'checked' : '' }}>
            </script>
        </div>

    </div>
</div>
</body>
{include file="public/footer" /}
{foreach name="js_url" item="vo"}
<script type="text/javascript" src="/static/admin/form/js/{$vo}.js"></script>
{/foreach}
</html>